# Tanım: PDF goruntuleyici
# URL: http://foolabs.com/xpdf
# Paketçi: milisarge
# Gerekler: lesstif
# Grup: ofis

isim=xpdf
surum=3.04
devir=1
kaynak=(ftp://ftp.foolabs.com/pub/xpdf/$isim-$surum.tar.gz)

derle() {
    cd $isim-$surum

    sed -i 's/\(s = XmStringCreateLocalized(\)/\1(char *)/g' xpdf/XPDFViewer.cc

    ./configure \
        --prefix=/usr \
        --with-Xm-library=/usr/lib \
        --with-Xm-includes=/usr/include/Xm \
        --with-freetype2-includes=/usr/include/freetype2 \
        --sysconfdir=/etc \
        --enable-a4-paper \
        --enable-opi \
        --with-t1-library=no \
        --mandir=/usr/man

    make
    make install DESTDIR=$PKG

    find $PKG/usr/bin $PKG/usr/man/man1 -iname 'pdf*' -delete
}
